<?php /* Smarty version Smarty-3.0.6, created on 2015-03-19 15:40:31
         compiled from ".\templates\displayItem.tpl" */ ?>
<?php /*%%SmartyHeaderCode:26990550adfdf330f10-13445863%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'de96d0d5acdbf3f1ee14eb008fede969057e9da4' => 
    array (
      0 => '.\\templates\\displayItem.tpl',
      1 => 1426775981,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '26990550adfdf330f10-13445863',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php $_template = new Smarty_Internal_Template("header.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?> <?php $_template = new Smarty_Internal_Template("selectArea.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?> 
<style>
.my_link:hover{
    text-decoration:underline;
}
</style>
<script>
    function changeImage(e) {
        document.getElementById('image').src = e;
    }

	$(document).ready(function() {
		//To display the selected area
	 	 var selectedAreaName = sessionStorage.getItem("selectedAreaName");
	     document.getElementById("popId").text=selectedAreaName;
	   	//To display Login UserName
	     var selectedUserName = sessionStorage.getItem("selectedUserName");
	     document.getElementById("userNm").text=selectedUserName;
	});
</script>
	<div style="width: 926px; height:485px; margin-left:10%; margin-top:15px">
		<?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('items')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
?>
				<?php if ($_smarty_tpl->tpl_vars['item']->value['item_id']==$_smarty_tpl->getVariable('itemvar')->value){?>
				<?php  $_smarty_tpl->tpl_vars['category'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('shop')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['category']->key => $_smarty_tpl->tpl_vars['category']->value){
?>
					<?php if ($_smarty_tpl->tpl_vars['item']->value['item_category_id']==$_smarty_tpl->tpl_vars['category']->value['category_id']){?>
					<!-- image thumbnails -->
					<div style="float:left;" >
						<img name="data:image/jpeg;base64,<?php echo base64_encode($_smarty_tpl->tpl_vars['item']->value['item_image']);?>
"
						onmouseover="changeImage(this.name); this.style.border='1px solid black'" onmouseout="this.style.border=''" src="data:image/jpeg;base64,<?php echo base64_encode($_smarty_tpl->tpl_vars['item']->value['item_image']);?>
" 
						style="display: block; width: 48px; height: 64px;margin-bottom: 3px;cursor: pointer;"/>
						<img name="/Project001/phpFiles/images/6.jpg" 
						onmouseover="changeImage(this.name); this.style.border='1px solid black'" onmouseout="this.style.border=''" src="/Project001/phpFiles/images/6.jpg" 
						style="display: block; width: 48px; height: 64px;margin-bottom: 3px;cursor: pointer;"/>
						<img name="/Project001/phpFiles/images/3.jpg"
						onmouseover="changeImage(this.name); this.style.border='1px solid black'" onmouseout="this.style.border=''" src="/Project001/phpFiles/images/3.jpg" 
						style="display: block; width: 48px; height: 64px;margin-bottom: 3px;cursor: pointer;"/>
					</div>
					<!-- main image -->
					<div style="margin-left:10px; float:left; width: 375px; height:485px;">
						<img id="image" src="data:image/jpeg;base64,<?php echo base64_encode($_smarty_tpl->tpl_vars['item']->value['item_image']);?>
" style="width:350px; height:460px;">
					</div>
					<div style="height:485px;">
						<div style="margin-top: 20px; margin-left: 450px;font-size:23px; font-weight: 500; font-family:arial;"><?php echo $_smarty_tpl->tpl_vars['item']->value['item_name'];?>
</div>
						<div style="margin-top: 1px; margin-left: 450px;">
							<a id=myDiv class="my_link" style="font-family:arial; font-size:12px; color:#9fa8ab;" href="#item-description">View Item Description</a>
							<span style="color:#9fa8ab;">|</span>
							<?php  $_smarty_tpl->tpl_vars['company'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('companyList')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['company']->key => $_smarty_tpl->tpl_vars['company']->value){
?>
							<?php if ($_smarty_tpl->tpl_vars['company']->value['company_id']==$_smarty_tpl->tpl_vars['item']->value['item_company_id']){?>
							<a class="my_link" style="font-family:arial; font-size:12px; color:#9fa8ab;" href=""><?php echo $_smarty_tpl->tpl_vars['company']->value['company_name'];?>
 Products</a>
							<?php }?>
							<?php }} ?>
						</div>		
						
						<?php if ($_smarty_tpl->getVariable('cookieValDisp')->value=="wholesale"){?>
						<?php  $_smarty_tpl->tpl_vars['wholeVal'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('wholesaleList')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['wholeVal']->key => $_smarty_tpl->tpl_vars['wholeVal']->value){
?>
							<div style="margin-top: 20px; margin-left: 450px; font-size:23px; font-weight: 500; font-family:arial;">Buy <?php echo $_smarty_tpl->tpl_vars['wholeVal']->value['whole_item_quantity'];?>
 Kgs for</div>
							<div style="margin-top: 20px; margin-left: 450px; font-size:23px; font-weight: 500; font-family:arial;">Rs <?php echo $_smarty_tpl->tpl_vars['wholeVal']->value['wholesale_price'];?>
</div>	
						<?php }} ?>
						<?php }else{ ?>
						<div style="margin-top: 20px; margin-left: 450px; font-size:23px; font-weight: 500; font-family:arial;">Rs. <?php echo $_smarty_tpl->tpl_vars['item']->value['item_retail_price'];?>
</div>		
						<?php }?>
						
						 <div style="position: absolute; margin-top: 20px; height: 50px; width: 170px;  margin-left: 450px;">
                 			<a style="text-align:center; position: absolute; top: 0; right:0; bottom:0; left:0; background-color:orange;" href="/Project001/phpFiles/index.php?Type=<?php echo $_smarty_tpl->tpl_vars['item']->value['item_id'];?>
">
                    		<span class="label"  style="margin-top: 14px;">Add to Cart</span>
                			</a>
						 </div>		
					</div>
					<?php }?>
				<?php }} ?>
				<?php }?>
			<?php }} ?>
	</div>
	<div id="item-description" style="width: 926px; height:250px; margin-left:10%; margin-top:15px">
		<h2 style="font-weight: 500; font-family:arial; font-size:17px; color: #666; padding-bottom: 5px; text-transform: uppercase;">Product Details</h2>
		<div style="margin-left:2%;">
			<p style="font-family:arial; font-size:14px; color: #666;">Category Name: <?php echo $_smarty_tpl->getVariable('category')->value['category_name'];?>
</p>
			<p style="font-family:arial; font-size:14px; color: #666;">Category Description:  <?php echo $_smarty_tpl->getVariable('category')->value['category_description'];?>
</p>
			<p style="font-family:arial; font-size:14px; color: #666;">Company Name: <?php echo $_smarty_tpl->getVariable('company')->value['company_name'];?>
</p>
			<p style="font-family:arial; font-size:14px; color: #666;">Item Description: <?php echo $_smarty_tpl->getVariable('item')->value['item_description'];?>
</p>
		</div>
	</div>
 
<?php $_template = new Smarty_Internal_Template("footer.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
